#include "Satck.h"

//void Stack::Init()
//{
//	_a = nullptr;
//	_top = _capacity = 0;
//}
//
//void Stack::Push(int x)
//{
//	if (_top == _capacity)
//	{
//		size_t newcapacity = _capacity == 0 ? 4 : _capacity * 2;
//		_a = (int*)realloc(_a, sizeof(int) * newcapacity);
//		_capacity = newcapacity;
//	}
//
//	_a[_top++] = x;
//}
//
//int Stack::Top()
//{
//	return _a[_top - 1];
//}
//
//
////void Stack::Push(int x)
////{
////	if (this->_top == _capacity)
////	{
////		size_t newcapacity = this->_capacity == 0 ? 4 : this->_capacity * 2;
////		this->_a = (int*)realloc(_a, sizeof(int) * newcapacity);
////		this->_capacity = newcapacity;
////	}
////
////	_a[_top++] = x;
////}